
<template>
    <div>      
        <h1>权限列表</h1>
          <Table :columns="columns1" :data="data1"></Table>
          <router-link to="addService">
          </router-link>          
    </div>
</template>
<script>
export default {
    data() {
        return {
            columns1: [
                {
                    title: "权限ID",
                    key: "id"
                },
                 {
                    title: "权限名称",
                    key: "name"
                },
                {
                    title: "权限说明",
                    key: "des"
                },          
            ],
            data1:[]
        };
    },
    mounted() {
        this.getManagement();
    },
    methods: {
        getManagement(){
            let qs = require('qs');
            this.axios({
                method: "post",
                url: `${this.adminUrl}/getManagement`,
                data: qs.stringify({})
                }).then(response => {
                    if ((response.data.result == 200)) {
                        this.data1 = response.data.data;                       
                    }else{
                        alert("请求失败");
                    }
                }).catch(err =>{
                    console.log(err);
            });
        }
    }
};
</script>

   



<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1 {
    margin-bottom: 20px;
    margin-top:20px;
}
button {
    margin-top: 50px;
}
span{
    display: inline-block;
    width: 100px;
    font-size: 16px;
}
.text{
    margin-bottom: 10px;
}

</style>
